/* 搜索结果分组标题 */
.search-group-title {
  padding: 8px 15px;
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 600;
  background-color: #f8f9fa;
  margin-top: 8px;
  margin-bottom: 4px;
}

/* 导航栏Logo样式优化 */
.navbar-logo {
  width: 35px;
  /* 从45px减小到35px */
  height: 35px;
  /* 从45px减小到35px */
  object-fit: cover;
  border-radius: 6px;
  /* 从8px减小到6px，保持圆角比例 */
}

.brand-text {
  font-size: 1.3rem;
  /* 从1.5rem减小到1.3rem */
  margin-left: 8px;
  /* 添加一点间距 */
}

/* 搜索框相关样式 */
.search-form {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    padding: 8px 0;
}

.search-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.search-item:hover {
    background-color: #f8f9fa;
    border-left: 3px solid #0d6efd;
}

.search-item .bi {
    font-size: 1.1rem;
}

.search-item .bi-clock-history {
    color: #6c757d;
}

.search-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item .delete-search {
    color: #dc3545;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 4px;
}

.search-item:hover .delete-search {
    opacity: 0.7;
}

.search-item .delete-search:hover {
    opacity: 1;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 50%;
}


/* 响应式布局相关样式 */
/* 通用样式 */
body {
    overflow-x: hidden;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .navbar-logo {
    width: 30px;
    height: 30px;
  }

  .brand-text {
    font-size: 1.1rem;
  }
}

/* 导航栏响应式 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #0d6efd;
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
    
    .search-form {
        margin-top: 1rem;
        max-width: 100%;
    }
}

/* 卡片响应式 */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 1.5rem;
    }
    
    .carousel-caption {
        padding: 1rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
}

/* 小屏幕文字大小调整 */
@media (max-width: 575.98px) {
    h2 {
        font-size: 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
}

/* 轮播图响应式高度 */
.carousel-item img {
    object-fit: cover;
    height: 60vh;
}

@media (max-width: 767.98px) {
    .carousel-item img {
        height: 40vh;
    }
}

/* 页脚响应式 */
@media (max-width: 767.98px) {
    footer {
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
        margin-top: 1rem;
    }
}

/* 新闻卡片网格系统优化 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* 景点卡片网格系统优化 */
.scenery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* 添加美景页面的响应式样式 */
/* 手风琴样式 */
.accordion-body .row {
    margin: 0;
}

@media (max-width: 767.98px) {
    .accordion-body .row {
        flex-direction: column;
    }
    
    .accordion-body .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .accordion-body img {
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit: cover;
    }
    
    .accordion-body .col-md-8 {
        padding: 1rem 0;
    }
}

/* 全景展示响应式 */
.panorama-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #f8f9fa;
}

.panorama-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panorama-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* 美景轮播图响应式 */
#sceneryCarousel .carousel-item {
    height: 60vh;
    background-color: #f8f9fa;
}

#sceneryCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    #sceneryCarousel .carousel-item {
        height: 40vh;
    }
    
    #sceneryCarousel .carousel-caption h3 {
        font-size: 1.5rem;
    }
    
    #sceneryCarousel .carousel-caption p {
        font-size: 1rem;
    }
}

/* 美景页面通用响应式调整 */
@media (max-width: 575.98px) {
    .accordion-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .accordion-body {
        padding: 0.75rem;
    }
    
    .accordion-body h4 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .accordion-body p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* 辅助类 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.3s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.05);
}

/* 加载动画 */
.loading {
    position: relative;
    min-height: 200px;
}

.loading::after {
    content: "加载中...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
}

/* 手风琴图片样式优化 */
.accordion-body img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f8f9fa;
}

/* 全景图片容器样式优化 */
.panorama-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #f8f9fa;
}

.panorama-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 添加到现有的 style.css 中 */
img {
    background-color: #f8f9fa; /* 添加背景色，防止图片加载时的闪烁 */
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.carousel-item img {
    height: 60vh;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .carousel-item img {
        height: 40vh;
    }
}

/* 历史时间轴的特色样式 */
.timeline-compact {
    position: relative;
    padding: 20px 0;
}

.timeline-compact::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #0d6efd;
}

.timeline-item-compact {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.timeline-badge {
    width: 80px;
    height: 80px;
    background: #0d6efd;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-content-compact {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-left: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.timeline-img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.timeline-text {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .timeline-compact::before {
        left: 40px;
    }
    
    .timeline-badge {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }
    
    .timeline-content-compact {
        margin-left: 15px;
    }
    
    .timeline-header {
        flex-direction: column;
    }
    
    .timeline-img {
        width: 100%;
        height: 120px;
    }
}

/* 添加动画效果 */
.timeline-item-compact {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item-compact:nth-child(1) { animation-delay: 0.1s; }
.timeline-item-compact:nth-child(2) { animation-delay: 0.2s; }
.timeline-item-compact:nth-child(3) { animation-delay: 0.3s; }
.timeline-item-compact:nth-child(4) { animation-delay: 0.4s; }
.timeline-item-compact:nth-child(5) { animation-delay: 0.5s; } 